package com.example.demo.repository;

import com.example.demo.entity.Users;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface UsersRepository extends JpaRepository<Users,String> {
    @Query("select b from Users b where b.userID = :userID")
    Users userLogin(String userID);

    @Query("select b.userName from Users b where b.userID = :userID")
    String userName(String userID);
}
